package com.tedu;

//8大基本类型
public class Test003 {
    public static void main (String[] args) {
        //整数 byte short int long
        byte a = Byte.MAX_VALUE;//127
        byte a1 = Byte.MIN_VALUE;//-128
        System.out.println(a); //a.sout 打印此值
        System.out.println("a1 = " + a1);//a1.soutv 格式化打印此值

        short b = Short.MAX_VALUE;
        short b1 = Short.MIN_VALUE;
        System.out.println(b);//32767
        System.out.println("b1 = " + b1);//-32768

        int c = Integer.MAX_VALUE;
        int c1 = Integer.MIN_VALUE;
        System.out.println(c);//2147483647
        System.out.println("c1 = " + c1);//-2147483648

        long d = Long.MAX_VALUE;
        long d1 = Long.MIN_VALUE;
        System.out.println(d);//9223372036854775807
        System.out.println("d1 = " + d1);
        System.out.println("==============");//-9223372036854775808

        //浮点数类型 float double
        double e = Double.MAX_VALUE;
        double e1 = Double.MIN_VALUE;
        System.out.println(e);//1.7976931348623157E308
        System.out.println("e1 = " + e1);//4.9E-324

        float f = Float.MAX_VALUE;
        float f1 = Float.MIN_VALUE;
        System.out.println(f);//3.4028235E38
        System.out.println("f1 = " + f1);// 1.4E-45


        //字符类型  ASCII
        char g = 'a';
        char g1 = '张';
        char g2 = '+';
        char g3 = ' ';
        char g4 = 97;
        System.out.println("g4 = " + g4);

        //布尔类型
        boolean h = true;
        boolean h1 = false;

        int a2 = 99999;
        long x = 99999999999L; //1.整数类型赋值不能超范围
        //2.整数类型默认是int

        double x1 = 3.14;
        float x2 = 3.1F; //浮点数默认是 double 类型
        double x3 = 100;
        System.out.println("x3 = " + x3);
    }
}
